<template>
  <el-table :data="detail" border style="width: 100%">
    <el-table-column label="编号" type="index" width="60" />

    <el-table-column
      v-for="item in columns"
      :key="item.dataIndex"
      :label="item.title"
      :prop="item.dataIndex"
      show-overflow-tooltip
    />
  </el-table>
</template>

<script setup lang="ts">
const props = defineProps({
  detail: Array
})
const columns = ref(
  Object.freeze([
    { title: '软件名称', dataIndex: 'softwareName' },
    { title: '软件简称', dataIndex: 'shortName' },
    { title: '软件著作人', dataIndex: 'softwareWork' },

    { title: '版本号', dataIndex: 'batchNum' },
    { title: '软件著作分类', dataIndex: 'softwareType' },
    { title: '行业分类', dataIndex: 'typeCode' },
    { title: '登记日期', dataIndex: 'regDate' },
    { title: '首次发表日期', dataIndex: 'firstDate' },
    { title: '登记号', dataIndex: 'regNo' },
    { title: '国籍', dataIndex: 'nationality' }
  ])
)
</script>
